<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Appointment List</title>
</head>
<body>
    <h1>Appointment List</h1>
    <table border="1">
        <tr>
            <th>ID</th>
            <th>Title</th>
            <th>Start Time</th>
            <th>End Time</th>
            <th>Location</th>
            <th>Status</th>
            <th>Actions</th>
        </tr>
        <c:forEach items="${appointments}" var="appointment">
            <tr>
                <td>${appointment.id}</td>
                <td>${appointment.title}</td>
                <td>${appointment.startTime}</td>
                <td>${appointment.endTime}</td>
                <td>${appointment.location}</td>
                <td>${appointment.status}</td>
                <td>
                    <a href="/appointment/edit/${appointment.id}">Edit</a>
                    <a href="/appointment/delete/${appointment.id}">Delete</a>
                </td>
            </tr>
        </c:forEach>
    </table>
    <br/>
    <a href="/appointment/add">Add New Appointment</a>
</body>
</html>